<template>
	<!-- navbar -->
	<!-- #ifdef APP-PLUS -->
	<u-navbar :title="navigationName" height="88" back-icon-size="36" back-icon-color="#1E1F22" title-bold
		title-color="#1E1F22"></u-navbar>
	<!-- #endif -->
	<!-- #ifndef APP-PLUS -->
	<u-navbar :title="navigationName" height="44" back-icon-size="36" back-icon-color="#1E1F22" title-bold
		title-color="#1E1F22"></u-navbar>
	<!-- #endif -->
</template>

<script lang="ts" setup>
	import { defineProps, toRefs, ref, watch } from 'vue'

	const props = defineProps({
		title: String
	})

	const navigationName = ref('')
	const title = toRefs(props).title
	const loginName = ref('')

	watch([title, loginName], () => {
		navigationName.value = `${title.value}（${loginName.value}）`
	})

	uni.getStorage({
		key: 'loginName',
		success: (res) => {
			loginName.value = res.data
		}
	})
</script>